package com.service.impl;/*
 *
 *作者：张继成
 *任务：
 *
 *备注：
 *@Date2023/06/11/12:26
 ***/

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.dao.XuekekechengDao;
import com.entity.XuekekechengEntity;
import com.entity.view.XuekekechengView;
import com.entity.vo.XuekekechengVO;
import com.service.XuekekechengService;
import com.utils.PageUtils;
import com.utils.Query;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("xuekekechengService")
public class XuekekechengServiceImpl extends ServiceImpl<XuekekechengDao, XuekekechengEntity> implements XuekekechengService {
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<XuekekechengEntity> page = this.selectPage(
                new Query<XuekekechengEntity>(params).getPage(),
                new EntityWrapper<XuekekechengEntity>()
        );
        return new PageUtils(page);
    }

    @Override
    public PageUtils queryPage(Map<String, Object> params, Wrapper<XuekekechengEntity> wrapper) {
        Page<XuekekechengView> page =new Query<XuekekechengView>(params).getPage();
        page.setRecords(baseMapper.selectListView(page,wrapper));
        PageUtils pageUtil = new PageUtils(page);
        return pageUtil;
    }

    @Override
    public List<XuekekechengVO> selectListVO(Wrapper<XuekekechengEntity> wrapper) {
        return baseMapper.selectListVO(wrapper);
    }

    @Override
    public XuekekechengVO selectVO(Wrapper<XuekekechengEntity> wrapper) {
        return baseMapper.selectVO(wrapper);
    }

    @Override
    public List<XuekekechengView> selectListView(Wrapper<XuekekechengEntity> wrapper) {
        return baseMapper.selectListView(wrapper);
    }

    @Override
    public XuekekechengView selectView(Wrapper<XuekekechengEntity> wrapper) {
        return baseMapper.selectView(wrapper);
    }

    @Override
    public List<Map<String, Object>> selectValue(Map<String, Object> params, Wrapper<XuekekechengEntity> wrapper) {
        return baseMapper.selectValue(params, wrapper);
    }

    @Override
    public List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params, Wrapper<XuekekechengEntity> wrapper) {
        return baseMapper.selectTimeStatValue(params, wrapper);
    }

    @Override
    public List<Map<String, Object>> selectGroup(Map<String, Object> params, Wrapper<XuekekechengEntity> wrapper) {
        return baseMapper.selectGroup(params, wrapper);
    }
}
